export const module2 = {
  namespaced: true,
  state: () => {
    return {count: 0}
  },
  mutations: {
    addCount: function(state, payload) {
      state.count += payload;
    },
    minusCount: function(state, payload) {
      state.count -= payload;
    },
  },
  actions: {
    addCountAsync: function(context, payload) {
      setTimeout(() => {
        context.commit('addCount', payload);
      }, 1000);
    },
    minusCountAsync: function(context, payload) {
      setTimeout(() => {
        context.commit('minusCount', payload);
      }, 1000);
    },
  }
};